<template>
  <view>
    <web-view :src="newUrl" />
  </view>
</template>

<script>
export default {
  data() {
    return {
      newUrl: '',
      subId:'',
      detailContent:'',//专题名称
    }
  },
  onLoad(option) {
    this.subId = option.subId
    this.detailContent= option.detailContent
    const {memberId} =this.vuex_accountInfo
    const {customerId,accountType} =this.vuex_memberInfo
    const { warehouseCode } = this.vuex_cityInfo
    this.newUrl = `${this.vuex_baseURL.webUrl}/h5/applet-h5/html/topicTemplate/index.html?subId=${option.subId}&wareHouseId=${warehouseCode}&memberId=${memberId}&customerI${customerId}&accountType=${accountType}&phoneType=ios`
   uni.setNavigationBarTitle({  title: this.detailContent })
 },
  //转发朋友
  onShareAppMessage(res) {
    if (res.from === 'button') { // 来自页面内分享按钮
      console.log(res.target)
    }
    const { warehouseCode } = this.vuex_cityInfo
    const {memberId} =this.vuex_accountInfo
    const {customerId,accountType} =this.vuex_memberInfo
    return {
      title: this.detailContent,
      imageUrl: `${this.vuex_imgPath}/share_index_icon.png`,
      path: `/customer/topicTemplate?subId=${this.subId}&wareHouseId=${warehouseCode}&memberId=${memberId}&customerI${customerId}&accountType=${accountType}&phoneType=ios`
    }
  },
}
</script>

<style scoped>

</style>
